<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="../vendor/bootstrap/css/bootstrap.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" href="../vendor/font-awesome/css/font-awesome.min.css">
    <!-- Custom Font Icons CSS-->
    <link rel="stylesheet" href="../css/font.css">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="../css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="../css/custom.css">
    <link rel="stylesheet" href="../bootstrap/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="../css/layer.css">
    <title>个人中心</title>

</head>
<body>
<header class="header">
    <nav class="navbar navbar-expand-lg">
        <div class="search-panel">
            <div class="search-inner d-flex align-items-center justify-content-center">
                <div class="close-btn">Close <i class="fa fa-close"></i></div>
                <form id="searchForm" action="#">
                    <div class="form-group">
                        <input type="search" name="search" placeholder="What are you searching for...">
                        <button type="submit" class="submit">Search</button>
                    </div>
                </form>
            </div>
        </div>
        <div class="container-fluid d-flex align-items-center justify-content-between">
            <div class="navbar-header">
                <!-- Navbar Header--><a href="home.jsp" class="navbar-brand">
                <div class="brand-text brand-big visible text-uppercase"><strong class="text-primary">小标</strong><strong>会议平台</strong></div>
                <div class="brand-text brand-sm"><strong class="text-primary">X</strong><strong>B</strong></div></a>
                <!-- Sidebar Toggle Btn-->
                <button class="sidebar-toggle"><i class="fa fa-long-arrow-left"></i></button>
            </div>
            <div class="right-menu list-inline no-margin-bottom">
                <!-- Log out -->
                <div class="list-inline-item logout">
                    <a id="logout" href="../index.jsp" class="nav-link"><span class="d-none d-sm-inline">Logout </span></a>
                </div>
            </div>
        </div>
    </nav>
</header>

<div class="d-flex align-items-stretch">
    <!-- Sidebar Navigation-->
    <%@include file="../assets/navJSP.jsp"%>
    <!-- Sidebar Navigation end-->
    <div class="page-content">
        <div class="page-header">
            <div class="container-fluid">
                <h2 class="h5 no-margin-bottom">个人中心</h2>
            </div>
        </div>
        <section class="no-padding-bottom">
            <!-- Form Elements -->
            <div class="col-lg-12">
                <div class="block">
                    <div class="title"><strong>我的头像</strong></div>
                    <div class="avatar"><img src="${sessionScope.user.pic}" id="pic" alt="加载中..." style="width: 150px;height: 150px" class="img-thumbnail rounded-circle"></div>
                    <div style="margin-top: 15px" class="text-left">

                        <!-- 真正的文件上传表单 -->
                        <input name="realFile" type="file" id="picFile" style="display: none" />
                    </div>
                    <div class="title">
                        <br>
                        <p class="h5"><strong>关注数：</strong><span>&nbsp;</span><span>&nbsp;</span><span>${sessionScope.userMessageNum}</span></p>
                        <br>
                        <p class="h5"><strong>被看数：</strong><span>&nbsp;</span><span>&nbsp;</span><span>${sessionScope.user.look}</span></p>
                        <br>
                    </div>
                    <div class="title"><strong>我的数据</strong></div>
                    <div class="block-body">
                        <form class="form-horizontal" action="/user/updateMessage">
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">真实姓名</label>
                                <div class="col-sm-9">
                                    <input type="text" name="realName" value="${sessionScope.user.realName}" class="form-control">
                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label" value="${sessionScope.user.deptName}" name="deptName"></label>
                                <div class="col-sm-9">
                                    <select class="selectpicker" data-live-search="true">
                                        <C:forEach items="${sessionScope.deptName}" var="dept">
                                            <C:if test="${dept.name!=sessionScope.user.deptName}">
                                                <option>${dept.name}</option>
                                            </C:if>
                                        </C:forEach>
                                    </select>
                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">电话</label>
                                <div class="col-sm-9">
                                    <input type="text" value="${sessionScope.user.phone}" name="phone" class="form-control">
                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">年龄</label>
                                <div class="col-sm-9">
                                    <input type="text" value="${sessionScope.user.age}" class="form-control" name="age">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">性别 </label>
                                <div class="col-sm-9">

                                    <div class="i-checks">
                                        <C:if test="${sessionScope.user.gender==1}">
                                            <input id="radioCustom1" type="radio" value="1" name="gender" class="radio-template" checked>
                                        </C:if>
                                        <C:if test="${sessionScope.user.gender!=1 and sessionScope.user.gender!=0 }">
                                            <input id="radioCustom1" type="radio" value="1" name="gender" class="radio-template">
                                        </C:if>
                                        <label for="radioCustom1">男</label>
                                        <span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
                                        <C:if test="${sessionScope.user.gender==0}">
                                            <input id="radioCustom2" type="radio" value="0" name="gender" class="radio-template" checked>
                                        </C:if>
                                        <C:if test="${sessionScope.user.gender!=1 and sessionScope.user.gender!=0 }">
                                            <input id="radioCustom2" type="radio" value="0" name="gender" class="radio-template">
                                        </C:if>
                                        <label for="radioCustom2">女</label>
                                    </div>
                                </div>


                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">注册时间</label>
                                <div class="col-sm-9">
                                    <input type="text" disabled="" placeholder="${sessionScope.user.registerTime}" class="form-control">
                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">登录时间</label>
                                <div class="col-sm-9">
                                    <input type="text" disabled="" placeholder="${sessionScope.user.loginTime}" class="form-control">
                                </div>
                            </div>
                            <div class="line"></div>

                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">是否私密 <br><small class="text-primary">默认为否，可以不设置</small></label>
                                <div class="col-sm-9">
                                    <div class="i-checks">
                                        <C:if test="${sessionScope.user.isSecret==0}">
                                            <input id="checkboxCustom1" type="checkbox" value="0" class="checkbox-template" name="isSecret" checked>
                                        </C:if>
                                        <C:if test="${sessionScope.user.isSecret!=0}">
                                            <input id="checkboxCustom1" type="checkbox" value="0" class="checkbox-template" name="isSecret">
                                        </C:if>
                                        <label for="checkboxCustom1">是否私密</label>
                                    </div>

                                </div>


                            </div>
                            <div class="line"></div>
                            <div class="text-center">
                                <input type="submit" class="btn btn-primary" value="保存">
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </section>

        <footer class="footer">
            <div class="footer__block block no-margin-bottom">
                <div class="container-fluid text-center">
                    <p class="no-margin-bottom">Copyright &copy; 2019.Company <a href="#" >东方标准</a> </p>
                </div>
            </div>
        </footer>
    </div>
</div>

<!-- JavaScript files-->
<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../bootstrap/js/bootstrap-select.min.js"></script>
<script src="../vendor/popper.js/umd/popper.min.js"> </script>
<script src="../vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="../vendor/jquery.cookie/jquery.cookie.js"> </script>
<script src="../vendor/chart.js/Chart.min.js"></script>
<script src="../vendor/jquery-validation/jquery.validate.min.js"></script>
<script src="../js/charts-home.js"></script>
<script src="../js/front.js"></script>
<script src="../js/custom.js"></script>
<script src="../js/layer.js"></script>
<script type="text/javascript">
    
    $("#pic").click(function () {

            $("#picFile").click();

        })
        $('#picFile').change(function () {
            layer.msg('上传成功');
        });
</script>
</body>
</html>